package com.example.hello.vo;

import lombok.Data;
import java.time.LocalDateTime;

@Data
public class DepartmentVO {
    private Integer id;
    private String name;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    public static DepartmentVO from(com.example.hello.entity.Department department) {
        DepartmentVO vo = new DepartmentVO();
        vo.setId(department.getId());
        vo.setName(department.getDepartmentName());
        vo.setCreateTime(department.getCreateTime());
        vo.setUpdateTime(department.getUpdateTime());
        return vo;
    }
} 